import { lazy } from "react";
import lazyLoad from "@/routers/utils/lazyLoad";
import { EmptyIndex } from "@/routers/constant";
import { RouteObject } from "@/routers/interface";

// 首页模块
const homeRouter: Array<RouteObject> = [
	{
		element: <EmptyIndex />,
		path: "useruse",
		children: [
			{
				path: "mahjongopen",
				element: lazyLoad(lazy(() => import("@/views/useruse/mahjongopen"))),
				meta: {
					title: "麻将教学-选择牌组",
				},
			},
			{
				path: "mahjongmain/:groupId",
				element: lazyLoad(lazy(() => import("@/views/useruse/mahjongmain"))),
				meta: {
					title: "麻将教学",
				},
			},
			{
				path: "mahjongtools/:groupId",
				element: lazyLoad(lazy(() => import("@/views/useruse/mahjongtools"))),
				meta: {
					title: "麻将教学-工具",
				},
			},
		],
	},
];

export default homeRouter;
